/**
 * @(#)FoodCommonFindRequest.java
 *
 * Copyright (c) 2014-2014  苏州犀牛网络科技有限公司 版权所有
 * xiniunet. All rights reserved.
 *
 * This software is the confidential and proprietary
 * information of  xiniunet.
 * ("Confidential Information"). You shall not disclose
 * such Confidential Information and shall use it only
 * in accordance with the terms of the contract agreement
 * you entered into with xiniunet.
 */
package net.showcal.api.request.mobile;

import net.showcal.api.ApiRuleException;
import net.showcal.api.XiniuRequest;
import net.showcal.api.contract.SortTypeEnum;
import net.showcal.api.internal.util.XiniuHashMap;
import net.showcal.api.response.mobile.FoodCommonCreateResponse;
import net.showcal.api.response.mobile.FoodCommonFindResponse;

import java.util.List;
import java.util.Map;

/**
 * Created by 顾志雄 on 2015-11-03 11:23:06.
 * @author 顾志雄
 */
public class FoodCommonFindRequest implements XiniuRequest<FoodCommonFindResponse> {
    private XiniuHashMap udfParams = new XiniuHashMap();

    @Override
    public String getApiMethodName() {
        return "thermalcontrol.foodCommon.find";//查询常见
    }

    @Override
    public Map<String, String> getTextParams() {

        XiniuHashMap txtParams = new XiniuHashMap();
        txtParams.put("pageNumber", this.pageNumber);
        txtParams.put("pageSize", this.pageSize);
        txtParams.put("sortKey", this.sortKey);
        txtParams.put("sortType", this.sortType);

        if (this.udfParams != null) {
            txtParams.putAll(this.udfParams);
        }
        return txtParams;
    }

    @Override
    public Long getTimestamp() {
        return null;
    }

    @Override
    public void setTimestamp(Long timestamp) {

    }

    @Override
    public Class<FoodCommonFindResponse> getResponseClass() {
        return FoodCommonFindResponse.class;
    }

    @Override
    public void check() throws ApiRuleException {

    }

    @Override
    public Map<String, String> getHeaderMap() {
        return null;
    }

    @Override
    public void putOtherTextParam(String key, String value) {
        this.udfParams.put(key, value);
    }

    /**
     * 当前页数
     */
    private int pageNumber;
    /**
     * 分页大小
     */
    private int pageSize;
    /**
     * 排序列
     */
    private List sortKey;
    /**
     * 排序方式
     */
    private SortTypeEnum sortType;

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List getSortKey() {
        return sortKey;
    }

    public void setSortKey(List sortKey) {
        this.sortKey = sortKey;
    }

    public SortTypeEnum getSortType() {
        return sortType;
    }

    public void setSortType(SortTypeEnum sortType) {
        this.sortType = sortType;
    }
}
